#pragma once

#define LOGIN 1
#define CHAT 2
#define CHATREQ 3
#define CHATRESP 4

#define FRIEND 5

#include<list>
#include"user.h"

typedef struct
{
    int service_type;
    int data_len;
}HEAD;

//登录请求
typedef struct
{
    int id;
    char password[10];
}LOGIN_REQ;

//登录响应
typedef struct
{
    int id;
    int status;
}LOGIN_RESP;

//聊天请求
typedef struct{
    int send_id;
    int recv_id;
    char  msg[100];
}CHAT_REQ;

//聊天响应
typedef struct 
{
    int status;
    char msg[100];
}CHAT_RESP;


typedef struct
{
    int id;
}FRI_REQ;

//好友列表响应
typedef struct 
{
    User users[10];
    int num;
}FRI_RESP;
